// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import VueRouter from 'vue-router'
import VueResource from 'vue-resource'
import goods from '@/components/goods/goods.vue'
import seller from '@/components/seller/seller.vue'
import ratings from '@/components/ratings/ratings.vue'
/*引入全局js*/
import '@/common/less/index.less'

/* 开启路由 */
Vue.use(VueRouter)
/*开启resource*/
Vue.use(VueResource)
/* 关闭生产环境提示 */
Vue.config.productionTip = false

const routes = [
  { path: '/goods', component: goods },
  { path: '/seller', component: seller },
  { path: '/ratings', component: ratings }
]

const router = new VueRouter({
  routes: routes,
  linkActiveClass: "active"
})

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router: router,
  template: '<App/>',
  components: { App }
})

/*默认跳转页*/
router.push("/goods")